package com.ict.txmsv2.model;

/**
 * @author yoleen
 * @date 2020/2/25 11:01
 */


public class RespBean {
    private String msg;
    private Object obj;
    private Integer status;

    public static RespBean ok(String msg){
        return new RespBean(msg,null,200);
    }

    public static RespBean ok(String msg, Object obj){
        return new RespBean(msg,obj,200);
    }

    public static RespBean error(String msg){
        return new RespBean(msg,null,500);
    }

    public static RespBean error(String msg, Object obj){
        return new RespBean(msg,obj,500);
    }

    private RespBean(String msg, Object obj, Integer status) {
        this.msg = msg;
        this.obj = obj;
        this.status = status;
    }

    private RespBean(String msg, Object obj) {
        this.msg = msg;
        this.obj = obj;
    }

    private RespBean(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
